package services;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import javax.faces.bean.ApplicationScoped;
import javax.faces.bean.ManagedBean;

import modelo.Cobro;
import dao.CobroDao;

@ManagedBean(name = "cobroService", eager = true)
@ApplicationScoped
public class CobroService implements Serializable {

	private static final long serialVersionUID = -1606053095563847775L;
	private Cobro cobro;
	private List<Cobro> listaCobros;
	private CobroDao cobroDao;
	
	public CobroService() {
		super();
		this.cobro = new Cobro();
		this.listaCobros = new ArrayList<Cobro>();
		this.cobroDao = new CobroDao();
		
	}
	
	public void guardarSalon(Cobro c){
		cobroDao.guardarCobro(c);
	}

	public Cobro getCobro() {
		return cobro;
	}

	public void setSalon(Cobro cobro) {
		this.cobro = cobro;
	}

	public List<Cobro> getListaCobros() {
		return listaCobros;
	}

	public void setListaSalones(List<Cobro> listaCobros) {
		this.listaCobros = listaCobros;
	}

	public CobroDao getCobroDao() {
		return cobroDao;
	}

	public void setCobroDao(CobroDao cobroDao) {
		this.cobroDao = cobroDao;
	}
	
	
	
}
